package com.wing.cabinet.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.AuthorityManage;
import com.wing.cabinet.model.request.AuthorityManageForm;
import com.wing.cabinet.model.response.AuthorityManageVO;
import com.wing.common.utils.PageResult;

import java.util.List;
import java.util.Map;

/**
 * 权限管理表-Service
 *
 * @author
 */
public interface AuthorityManageService extends IService<AuthorityManage> {

    /**
     * 添加
     *
     * @param authorityManageForm
     * @return
     */
    int add(AuthorityManageForm authorityManageForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<AuthorityManageVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<AuthorityManageVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    AuthorityManageVO get4appById(Long id);

    int enable(Long id,String type);

    int updateAuthorityManage(AuthorityManageForm authorityManageForm);
    //柜子查看产品分类权限
    String getCabinetProductAuthority(Long cabinetId);


    PageResult findMateriel(Integer page, Integer limit, String ids, Long authorityManageId, String categoryIds, String skuName, String skuCode, String oldSpecCode, String productBrandName);

    boolean removeAll(Long authorityManageId);
}
